package com.dyl.sms.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantPropertiesUtil implements InitializingBean {
    //dysmsapi.aliyuncs.com
    @Value("${aliyun.oss.file.endpoint}")
    private String endpoint;

    @Value("${aliyun.oss.file.keyid}")
    private String keyId;

    @Value("${aliyun.oss.file.keysecret}")
    private String keySecret;
//签名
    @Value("${aliyun.oss.file.qianming}")
    private String qianMing;
//模板
    @Value("${aliyun.oss.file.moban}")
    private String moBan;

    public static String END_POINT;
    public static String ACCESS_KEY_ID;
    public static String ACCESS_KEY_SECRET;
    public static String QIAN_MING;
    public static String MO_BAN;

    @Override
    public void afterPropertiesSet() throws Exception {
        END_POINT = endpoint;
        ACCESS_KEY_ID = keyId;
        ACCESS_KEY_SECRET = keySecret;
        QIAN_MING = qianMing;
        MO_BAN = moBan;

    }
}
